package com.wanshi.service.impl;

import com.wanshi.entity.Banner;
import com.wanshi.mapper.BannerMapper;
import com.wanshi.service.BannerSercice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author TianYu
 * @create 2021-11-12-13:31
 */
@Service
public class BannerServiceImpl implements BannerSercice {

    @Autowired
    private BannerMapper bannerMapper;

    @Override
    public List<Banner> findAll() {
        return bannerMapper.findAll();
    }

    @Override
    public void save(Banner banner) {

        bannerMapper.save(banner);
    }

    @Override
    public Banner getById(int parseInt) {
        return bannerMapper.getById(parseInt);
    }

    @Override
    public void deleteById(int parseInt) {

        bannerMapper.deleteById(parseInt);
    }
}
